package br.com.tweetsentiment.conexao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

public class ConexaoBanco {

	protected Connection con;
	protected PreparedStatement stmt;
	protected ResultSet rs;

	public ConexaoBanco() {

	}

	public void openConnection() throws Exception {

		String driver = "com.mysql.jdbc.Driver";
		String url = "jdbc:mysql://177.19.155.153:3306/forcaon_analisador";
		String user = "forcaon_root";
		String password = "awfbe0310";

		Class.forName(driver);
		con = DriverManager.getConnection(url, user, password);
	}

	public void closeConnection() {
		try {
			if (con != null) {
				con.close();
			}
		} catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}

}
